package cn.com.greatwall.oauth.utils;
/**
 * @Author herw
 * @Time 2022-01-18 09:07:33
 * @Version 1.0
 * @Description: TODO(用一句话描述该文件做什么)
 */
public class UsernameHolder {
    private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();
    
    public static String getContext() {
        return contextHolder.get();
    }
    
    public static void setContext(String username) {
        contextHolder.set(username);
    }
    
    public static void clearContext() {
        contextHolder.remove();
    }
}
